# -*- coding: utf-8 -*-
# @Time : 2019/1/2 15:42
# @Author : Administrator
# @File : basic.py
# @Project : 4.Python
# @title :
import psutil
# print(psutil.test())
# print(psutil.users())
# print(psutil.pids())
# print(psutil.virtual_memory())
# print(psutil.virtual_memory().percent)
# print(psutil.virtual_memory().available)

# print(psutil.cpu_percent())
# print(psutil.disk_partitions())
# print(psutil.disk_usage('C:\\'))
# print(psutil.disk_usage('C:\\').percent)
# print(psutil.disk_usage('C:\\').free)

# print(psutil.net_io_counters())
print("-----统计MEM-----")
print(psutil.virtual_memory())
print(psutil.virtual_memory().percent)
print(str(psutil.virtual_memory().percent)+"%")

print("-----统计Disk----")
print(psutil.disk_usage("C:\\"))
print(str(psutil.disk_usage("C:\\").percent)+"%")
print(psutil.disk_usage("D:\\"))
print(str(psutil.disk_usage("D:\\").percent)+"%")

print("-----统计CPU-----")
print(psutil.cpu_percent())

print("-----统计NET-----")
print(psutil.net_io_counters())
